package com.un.ebs.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.un.ebs.workflow.domain.Workflow;
import com.un.ebs.workflow.domain.WorkflowNode;
import com.un.ebs.workflow.domain.WorkflowNodeExt;
import com.un.ebs.workflow.domain.WorkflowNodeGateway;
import com.un.ebs.workflow.dto.*;

import java.util.List;

/**
 * (Workflow)表服务接口
 *
 * @author liubo
 * @since 2020-08-23 09:56:25
 */
public interface WorkflowService {

    void update(WorkflowUpdateDto req);

    void updateNode(WorkflowNodeUpdateDto req);

    void updateGateway(WorkflowNodeGatewayUpdateDto req);

    void delete(String id);

    void deleteNode(String id);

    void deleteGateway(String id);

    IPage<Workflow> query(String searchText, int pageSize, int pageIndex);

    WorkflowNodeGateway queryFirstGateway(String workflowId);

    Workflow queryById(String id);

    WorkflowNodeVo queryAllNodeById(String workflowId);

    List<WorkflowNodeExt> queryNodes(String workflowId);

    List<WorkflowNodeGateway> queryGatewayByWorkFlowId(String workflowId);

    WorkflowNodeExt queryNodeById(String nodeId);

    WorkflowNodeGateway queryGateway(String id);

    List<WorkflowNodeVo> queryNextNodes(String workflowId, String currNodeId);

    WorkflowNode queryPrevNode(String workflow, String currNodeId);
}